package com.banciyuan.bcywebview.biz.detail.mixweb.bridge;

import android.content.Context;
import android.util.Log;
import android.webkit.JavascriptInterface;

/**
 * Created by squall on 2016/12/9.
 */

public class EditorBridge {

    private Context mContext;

    public EditorBridge(Context mContext) {
        this.mContext = mContext;
    }

    @JavascriptInterface
    public int provideContentPaddingTop() {
        return 16;
    }

    @JavascriptInterface
    public int provideContentPaddingBottom() {
        return 16;
    }

    @JavascriptInterface
    public int provideContentPaddingLeft() {
        return 16;
    }

    @JavascriptInterface
    public int provideContentPaddingRight() {
        return 16;
    }

    @JavascriptInterface
    public void onClickBody() {

    }

    @JavascriptInterface
    public void onDocumentReady() {

    }

    @JavascriptInterface
    public void onMentionKeyUp() {

    }

    @JavascriptInterface
    public void onTextChanged(int length) {
        Log.i("length=====", length + "");
    }

    @JavascriptInterface
    public void onHtmlGenerated(String html) {

    }

    @JavascriptInterface
    public String provideContent() {
        return "";
    }

    @JavascriptInterface
    public String providePlaceholder() {
        return "Hello world";
    }

    @JavascriptInterface
    public String provideSharePostHtml() {
        return "";
    }

    @JavascriptInterface
    public boolean isSharePostHolderVisible() {
        return true;
    }

    @JavascriptInterface
    public int provideContentHeight() {
        return 600;
    }
}
